package packing;

import geometric3D.BoxShape;

public class SimpleBlock extends BoxShape{

	protected int xBoxNumber;
	protected int yBoxNumber;
	protected int zBoxNumber;
	protected BoxPack box;
	
	public SimpleBlock(BoxPack box, int xBoxNumber,int yBoxNumber, int zBoxNumber ) {
		super();
		this.xBoxNumber = xBoxNumber;
		this.yBoxNumber = yBoxNumber;
		this.zBoxNumber = zBoxNumber;
		this.box = box;
		
		this.width = box.getWidth()*xBoxNumber;
		this.length = box.getLength()*yBoxNumber;
		this.height = box.getHeight()*zBoxNumber;
	}

	public int getxBoxNumber() {
		return xBoxNumber;
	}
	

	public int getyBoxNumber() {
		return yBoxNumber;
	}

	public int getzBoxNumber() {
		return zBoxNumber;
	}

	public BoxPack getBox() {
		return box;
	}

	public int getBoxNumber() {
		
		return xBoxNumber*yBoxNumber*zBoxNumber;
	}
	@Override
	public String toString() {
//		return "SimpleBlock [box=" + box + ", xBoxNumber=" + xBoxNumber
//				+ ", yBoxNumber=" + yBoxNumber + ", zBoxNumber=" + zBoxNumber
//				+ "]";
		return "SimpleBlock : box = ( " + box + " ), xBoxNumber = " + xBoxNumber
				+ ", yBoxNumber = " + yBoxNumber + ", zBoxNumber = " + zBoxNumber;
	}
	
	public int  getYZArea(){
		return box.getLength()*yBoxNumber *box.getHeight()*zBoxNumber;
		
	}
	
	public int  getXZArea(){
		return box.getWidth()*xBoxNumber *box.getHeight()*zBoxNumber;
		
	}
	public int  getXYArea(){
		return box.getWidth()*xBoxNumber *box.getLength()*yBoxNumber;
		
	}
	public int getSumAllWeight(){
		return getBoxNumber() * box.getWeight() ;
	}
}
